Mobile App

DRUID chatbots can be deployed in mobile applications using the existing web channel (also called Direct Line) through a WebView implementation, which allows the display of web content (HTML, CSS, JavaScript).

Note:  DRUID does not currently offer a native Software Development Kit (SDK) for mobile app integration.

Optionally, push notifications can also be configured to notify users about chat related events like new unread messages.

Platform Compatibility

  • iOS and Android platforms are supported.
  • Cross-platform frameworks (like, React Native, Flutter, Ionic, etc.) can integrate DRUID chatbots using WebViews, though some framework-specific limitations may apply.
  • While DRUID chatbots have not been extensively tested in mobile apps using the frameworks above, no major incompatibilities are currently known.
  • Each platform and framework combination may behave uniquely due to variations in the WebView implementations.

Technical Considerations

DRUID chatbots rely on standard web technologies, which may behave differently in WebView environments. Consider the following limitations when integrating with mobile applications:

  • Network Communication. The chatbot uses WebSockets for real-time communication with DRUID backend services. Mobile operating systems may terminate these connections when the app is sent to the background to save battery.
  • Data Persistence. Conversation history and user data are stored using browser cookies and local storage. This means reliability across all WebView implementations may not be consistent, potentially affecting data persistence.
  • Browser APIs. The chatbot may use browser-specific APIs (such as Web Speech API) that are not available or behave differently in WebView environments.
  • User Interface Behavior. Input handling, virtual keyboard behavior, and element rendering may differ from standard web browsers.
  • URL Navigation. URLs may open either within the WebView or in the device’s default browser, depending on platform behavior and the mobile app's implementation.
  • File Downloads. The behavior of file download links varies by platform and the WebView implementation.

Testing and Troubleshooting

Issues that cannot be reproduced in standard web browsers (Chrome, Safari, Edge, Firefox etc.) are considered WebView implementation-specific and must be addressed by the mobile development team. DRUID can provide guidance on the chatbot configuration but cannot troubleshoot WebView-specific behavior.

Backend Services

The diagram below shows the communication flow within a mobile app integration.

DRUID doesn't communicate directly with the mobile app. Instead, it securely connects through the DRUID Connector Host, which interacts with the mobile app's backend service, part of the client’s internal systems. The Connector Host transmits the conversation ID and any new or unread messages to ensure users receive notifications when chatting with the bot in the app. If the app is closed, new or unread messages are delivered via the app’s push notification system (Firebase for Android, APNs for iOS).

Additionally, the WebChat reports the number of read messages to the Conversational Engine through the DRUID bot API.

Push Notifications

DRUID chatbots can notify your backend system when new messages arrive. It is your backend’s responsibility to trigger the actual push notification to the mobile devices.

Authentication

DRUID supports JWT tokens, SSO, and custom query parameters for user authentication during chat sessions. These can help the chatbot identify and respond to authenticated users. For more information, see Authenticating Users in the DRUID Webchat.

Integration

Embed the Web Chat snippet in the Mobile App

  1. On the Channels tab, in the WebChat section, customize the web chat snippet parameters as needed. For more details, see WebChat Common Styling and Behavior.
  2. Copy the web chat snippet and add it to your mobile app.

Users can now interact with the bot directly from the mobile app.

Alternative option: Custom Chat Interface via API

If you want to build your own custom chat interface instead of using the WebChat widget, the DRUID Platform also exposes messaging APIs you can use to send and receive chat messages programmatically.

These APIs are part of the same backend services used for DRUID’s voice channels (including Speech-to-Text and Text-to-Speech). While they have primarily been used for custom voice integrations so far, they can be adapted to support custom-built conversation interfaces in mobile or web applications.

Note:   This integration path requires custom development effort and a deeper understanding of the DRUID messaging layer. We recommend you to use this alternative only if the current integration does not meet your use case. DRUID can provide technical guidance upon request.

Push notifications

Note:  Sending push notifications is available in DRUID 7.18 and later.

To enable push notifications for a mobile app deployment, follow these steps:

Step 1. Configure app and integration

  1. From the Solution Library, import solution Bot message notifications. The solution includes a predefined app and integration.
  2. In the Solution Contents menu, click Apps, then select the Message Notification app.
  3. Enter the Base URL of the mobile app's backend service.
  4. In the Solution Contents menu, click Integrations, then click on the Send message status notifications integration.
  5. Update the request with the mobile app's specific push notification endpoint. Map the following mandatory MessageNotification fields:
    • [[MessageNotification]].ConversationId
    • [[MessageNotification]].IncomingMessagesCount
    • [[MessageNotification]].LastMessageOn

  6. Publish the integration.

Step 2. Enable the bot API

Make sure the bot API is enabled to facilitate communication between the bot and the app for handling message notifications. To do this, go to the Administration menu and click on Settings. Then, select the Druid Bot API tab and check the Is Enabled option.

Step 3. Enable message notifications

  1. In the bot details, click the Channels tab
  2. Click on WebChat.
  3. Select Enable message notification.
  4. In the Message notification integration field, choose the integration you configured in Step 1.
  5. Click Save.